class User < ActiveRecord::Base

    has_one :account
    has_and_belongs_to_many :sites, :join_table => "roles_sites_users"
    has_and_belongs_to_many :roles, :join_table => "roles_sites_users"
    
    def self.make(username)
    	if user = User.find_first(["username = ?", username])
            return user        
        else
            User.create(:username => username)
        end
    end
    
end